package com.cms.clash.dto;

/**
 * 推荐属性枚举
 * @author cms
 * @version 1.0.0
 * @date 2024/7/28
*/

public enum FlagEnum {
    IS_B("is_b"),
    IS_HEAD("is_head"),
    IS_SPECIAL("is_special"),
    IS_TOP("is_top"),
    IS_RECOMMEND("is_recommend"),
    IS_JUMP("is_jump"),
    IS_THUMB("is_thumb"),
    IS_ROLL("is_roll"),
    IS_SLIDE("is_slide");

    private String typeName;

    FlagEnum(String typeName) {
        this.typeName = typeName;
    }

    /**
     * 检测flag属性是否正确
     * @param flag
     * @return
     */
    public static boolean checkFlagIsExist(String flag) {
        boolean exist = false;
        if (null == flag){
            return exist;
        }
        for (FlagEnum value : FlagEnum.values()) {
            if (value.typeName.equals(flag)) {
                exist = true;
                break;
            }
        }
        return exist;
    }

}
